package pkg

import (
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
	"log"
	"user_bff/user"
)

func Comment() user.UserClient {
	conn, err := grpc.Dial("127.0.0.1:8081", grpc.WithBlock(), grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		log.Println(err)
		return nil
	}
	client := user.NewUserClient(conn)
	return client
}
